import junit.framework.Assert;
import org.testng.annotations.Test;
import someclass.userLogin;

public class testUserLogin {
    @org.junit.Test
    public void show_welcome_message_when_entered(){
        userLogin welMess = new userLogin();
        Assert.assertEquals("Welcome to Biblioteca System!", welMess.showWelcome());
    }
    @Test
    public void should_show_prompt_message_when_started(){
        userLogin showPrompt = new userLogin();
        Assert.assertEquals("Please input right username and password to login:", showPrompt.showPromptMessage());
    }

    @Test
    public void should_return_true_when_login_information_right(){
        userLogin rightUsername = new userLogin();
        Assert.assertEquals(true,rightUsername.checkUsername("001","001"));
    }

    @Test
    public void should_show_wrong_message_when_login_information_wrong(){
        userLogin wrongInformation = new userLogin();
        Assert.assertEquals("Input wrong,please input again!",wrongInformation.showWrongMessage());
    }
}
